<template>
	<view>
		<dsl-navbar :title="title" bgTopImg="white" isBack></dsl-navbar>
		<view class="padding">
			<view v-html="content?content:'暂无'"></view>
		</view>
	</view>
</template>

<script>
	import {getEditor} from '../../common/path.js'
	export default {
		data() {
			return {
				title:'',
				type:1,
				content: ''
			}
		},
		//生命周期函数
		onReady() {},
		onLoad(option) {
			this.title = option.title
			this.type=option.type
			this.getEditor()
		},
		onShow() {},
		methods: {
			//协议类型 0-用户及隐私协议 1-关于我们 2-隐私协议 3-用户协议
			getEditor(){
				let data = {
					type:this.type
				}
				this.Http.POST(getEditor,data)
				.then((res)=>{
					if(res.code ==0){
						console.log('[协议]',res.data.content);
						this.content = res.data.content
					}
				})
			}
		},
		computed: {},
		components: {}
	}
</script>

<style>
</style>
